In the processing of digital multimedia data, particularly video data, compression and the compression techniques employed offer significant advantages in storage and transmission. MPEG has become the predominant standard in handling such video data. The MPEG standard defines the structure of a compressed data stream, referred to as an MPEG data stream, and this structure imposes several constraints on the storage and play of video data. FIG. 1 illustrates an example of an MPEG data stream. In the example of FIG. 1, the video stream is divided into intra frames I, predictive frames P, and interpolated frames B. The I frames are a type of frame commonly referred to as an anchor frame. The P frames are a type of forward predictive encoded frame in that P frames are encoded based on a temporally preceding frame. The B frames are a type of bi-directionally encoded frame in that B frames are encoded based on a temporally preceding and succeeding frames. The frames from one I frame to the next are commonly referred to as a group of pictures or GOP. While the discussion of MPEG techniques, prior art systems and the present invention will use the example of a video stream divided into frames, it will be understood that the MPEG standard also provides for structures other than frames, such as even and odd fields, top and bottom fields, etc. In this disclosure, the terminology “picture” will be used as a generic term covering the frame, field, etc. formats.
Referring again to FIG. 1, I frames are encoded independent of any other frames in the sequence. Accordingly, decoding an I frame does not require any other frame in this sequence. P frames are encoded using motion estimation, and are dependent on the preceding I or P frame in the sequence. Accordingly, with P frames, these frames cannot be decoded without the preceding I or P frame. B frames are encoded using the I or P frame preceding the B frame and the I or P frame succeeding the B frame as indicated by the arrows in FIG. 1. Accordingly, with B frames, these frames cannot be decoded without the preceding and succeeding I or P frames.
FIG. 1 illustrates the display order of the frames in a GOP. However, because of the decoding dependency of P and B frames, the order in which the frames are presented to the decoder is much different than their display order. FIG. 2 illustrates both the display and decoding orders 202 and 204 of the GOP illustrated in FIG. 1. As shown by the decoding order 204, the frames needed for decoding a subsequent P or B frame, are received by the decoder prior to receipt of that P or B frame. Typically, the decoded frames are temporarily stored in a memory and then read out in the display order 202 for display.
Such a system works well for displaying the video data in a normal forward play mode, but there are instances where a user may want to play the video data in a reverse play mode. As will be appreciated, this adds a level of complexity in decoding B and P frames. For example, displaying frame B14 requires decompressing frames P13 and I16, but decompressing frame P13 requires decompressing frame P10, which requires decompressing frame P7, which requires decompressing frame P4, which requires decompressing frame I1. Thus, decoding a P frame during the reverse play mode, requires decoding, in a reverse sequence, all the P frames until an I frame is reached.
FIG. 3 illustrates a prior art MPEG decoder that supports a reverse play mode. As shown, an input device 302 stores an MPEG data stream. A decoder 304 decodes the compressed data stored in the input device 302. The decoder 304 outputs the decompressed data in the forward play display order for display on a display device 306. The decompressed data output from the decoder 304 is also stored by a frame buffer memory 308. During reverse play, the frame buffer memory 308 is accessed, and the decompressed data is read out in the reverse display order for display on the display device 306. To permit reverse play as described, the prior art system of FIG. 3 requires an extremely large frame buffer memory 308.
Japanese Patent JP 2000-101969 discloses a similar system to that discussed above with respect to FIG. 3. However, in this Japanese patent document, only the I and P frames are stored in the frame buffer memory during forward play. During reverse play, the B frames are decompressed using the stored decompressed I and P frames, and the decompressed frames are played out in the reverse play order. As will be appreciated, if the number of frames in a GOP is large, then the frame buffer memory must still be quite large to permit reverse play.
Japanese Patent JP 1997-037209 also discloses a system that supports the reverse play mode. In this system, only I frames are decoded and displayed in the reverse play mode. As a result, only partial frames are played in the reverse play mode, and the quality of the resulting display is of extremely poor quality.
FIG. 4 illustrates a block diagram of another prior art system that supports the reverse play mode. As shown, an input device 402 stores an MPEG data stream. A decoder 404 decodes the compressed data stored in the input device 402. The decoder 404 temporarily stores the decompressed data in a frame memory 406. The decoded frames are read out from the frame memory 406 in the display order and displayed on a display device 412. During this forward play mode of operation, the decoded frames sent to the display device 412 are also received by an I frame encoder 410. The I frame encoder 410 encodes the decompressed frames in I frame format, and stores the I frames in a buffer memory 408. During the reverse play mode, the frames stored in the buffer memory 408 are read out and decoded by the decoder 404. The decoded frames, read from the buffer memory 408 in reverse order, are then displayed on a display device 412.
As compared to the system illustrated in FIG. 3, a smaller memory is required because the frames are stored in a compressed format. On the other hand, more encoding is required. And, because all of the frames are re-encoded into I frame format and stored, a significant amount of memory space is still required for the reverse play mode. Also, because all compressed I frames must be decoded again to be displayed, more processing time is also required.
U.S. Pat. No. 5,742,347 discloses another system for decoding and displaying an MPEG data stream in both forward play and reverse play modes. As disclosed, each decompressed P frame is re-encoded as an I frame and stored in a secondary storage device. During reverse play, the secondary storage device is accessed to decode and display P frames, and is also accessed to obtain the P frames needed for decoding B frames. As a result, the need to decode multiple P frames until an I frame is reached as discussed above with respect to FIG. 3 is not required, and because there is no motion estimation and compensation required for compressing a single frame into an I frame, the I frame encoding is performed efficiently. However, for large GOPs, this technique still requires a relatively large secondary storage. Also, I frame encoding is still required, even if all B frames are not encoded into I frames. Accordingly a demand to reduce the processing time including the encoding and decoding time and to make the secondary storage smaller still exists.